home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / ab20 / hardware / ioexpnsn.lzh / Docs / Article.txt next >
Text File  |  1991-03-16  |  38KB  |  759 lines

  1. 16 March 1991
  2.  
  3.                          More Ports for Your Amiga
  4.  
  5.                           An I/O Expansion board
  6.  
  7. by Jeff Lavin
  8. Copyright ©1990,91 The Puzzle Factory
  9.  
  10. Many of you in the Amiga community have built Brad Fowles' excellent  "LUCAS"
  11. accelerator board, which introduced the idea of "Public Domain Hardware".  In
  12. this  article  I  will present another public domain hardware project for the
  13. Amiga, which will enable you to add two parallel ports and two  serial  ports
  14. to  your  Amiga  500,  1000 or 2000 for $70.  Furthermore, you can easily and
  15. inexpensively upgrade to four parallel ports and/or four serial ports at  any
  16. time.
  17.  
  18. The hardware consists of a small printed circuit board with a  40  pin  cable
  19. and  DIP jumper that plugs into the socket occupied by CIA B, and a small pcb
  20. that contains the serial interface (see file "IO_Exp_Diag.iff").   CIA  B  is
  21. physically moved onto the I/O Expansion board.
  22.  
  23.  
  24. Raison d'etre
  25. =============
  26. As a hardware hacker of long standing, I have a number   of  small  computers
  27. with  all  sorts  of  hardware  attached  to  them, from extra ports to EPROM
  28. programmers, and longed to do the same with the Amiga.  Since the Amiga  uses
  29. a pair of 8520's (actually 6526's) for its I/O, I figured it would be a piece
  30. of  cake  to  add more 65/68XX family peripheral chips and be up and running.
  31. The only problem was that, because there is no obvious chip select  decoding,
  32. I  could  never  figure  out how the 8520's were addressed.  One day a friend
  33. came  by,   and   we  were  able  to  figure  out  that  the  I/O  chips  are
  34. "automatically" selected when certain addresses are generated by logic hidden
  35. in  the  PALS.  Now that the final piece of the puzzle was in place, I wasted
  36. no time and had a prototype in my Amiga in two weeks.
  37.  
  38.  
  39. How it works
  40. ============
  41. This hardware hack is possible because of two things  the  designers  of  the
  42. Amiga did for us:
  43.  
  44.   1. The address space where the CIAs live is incompletely decoded.  This
  45.      means the 16 CIA registers are echoed repeatedly over a large range.
  46.  
  47.   2. The locations where software is supposed to address the CIA registers
  48.      is completely specified over a much smaller range.
  49.  
  50. These two facts make it possible for us to take the chip select from one CIA,
  51. and divide it into four parts.  The addresses in the upper part are routed to
  52. the CIA normally, and we "steal" the addresses  from  the  remainder  of  the
  53. space for our own use (see file "IO_Exp_Diag.iff").  Because the "hard" part,
  54. most of the address decoding and the bus timing, has been done for us, we can
  55. get  away with nothing more complicated than an additional address decoder to
  56. split off our address space.
  57.  
  58. Unfortunately, this hack is not possible on the A3000  for  the  same  reason
  59. that  it is possible on earlier Amigas.  The address decoding on the A3000 is
  60. complete; there are no "extra" incompletely decoded addresses to "steal".
  61.  
  62. As you will note, the VIA and ACIA registers are still echoed over  a  pretty
  63. wide  address  range.   We  have specified where to address them for the same
  64. reason that Commodore has  specified  addresses  for  the  CIAs:   to  ensure
  65. software  compatibility  (see  file "IO_Exp_Diag.iff", Register Summary).  We
  66. would very much like to see enough people build these  boards  to  create  an
  67. installed software base.  So programmers, please use these addresses when you
  68. are  writing  all  those  neat  multi-line  BBS   programs   and   multi-user
  69. applications, as well as process control programs, robotics demos, etc.
  70.  
  71.  
  72. The Disclaimer
  73. ==============
  74. This is a simple hack, and if you get the bare boards, or a  parts  kit,  you
  75. should  have  no  trouble  putting  it together and having it running on your
  76. Amiga in short order.  You do not need to understand how this board works  to
  77. enjoy  using  it,  but it will help if you have to fix it.  While not hard to
  78. build, from the time you start this project, it is your sole  responsibility.
  79. If you fry your beloved Amiga, or have other problems, they're your problems.
  80. Because the RF shield is modified in order to install this board (on an Amiga
  81. 1000),  it's  your  responsibility  to comply with FCC regulations concerning
  82. RFI.  If your neighbors complain of RFI on their TV sets, you must solve  the
  83. problem.   If  you  have  no  experience  soldering  or  handling  electronic
  84. components, don't try this project as your first one!  I may be able to offer
  85. advice for some problems, but I will  not  be  a  repair  resource  for  this
  86. project.   I  check  BIX  regularly, and my email address is jblavin.  Usenet
  87. users may also send email to jlavin@cie.uoregon.edu, and  please  check  your
  88. return  path for accuracy.  Alternatively, you can leave a message on my BBS,
  89. The Symposium, 24 hrs, 2400 baud, at (503) 935-7883.
  90.  
  91. While  every  effort has been made to make these instructions as accurate and
  92. complete as possible, neither Jeff Lavin or The Puzzle Factory, Inc.  accepts
  93. any responsibility arising from any inaccuracies contained herein.
  94.  
  95.  
  96. Assembly
  97. ========
  98. If you're still with me, the first step is to get the bare board and all  the
  99. required  parts.   Detailed  assembly instructions will be supplied, on disk,
  100. with your order.  See below for details and sources.   Carefully  follow  the
  101. instructions  that  come  with  the boards and solder sockets for all the ICs
  102. onto the boards.  Solder the capacitors,  resistors,  and  the  crystal  into
  103. place.   Solder the dual-row and single-row headers, being especially careful
  104. of solder bridges.  Install all the other parts.   Cut  two  pieces  of  wire
  105. about  8  inches  long  (28-30  gauge stranded wire will work well here), and
  106. solder one end of each wire to the posts of J3.   Assemble  the  DIP  adapter
  107. cable.   Place the board on a piece of conductive foam or some foil.  Install
  108. the ICs.  One or both of the VIAs and/or DACIAs  may  be  installed  at  this
  109. time.   If  you  choose  to  install  only  one of either chip at this point,
  110. install it in the socket indicated.
  111.  
  112.  
  113. A500 Installation
  114. =================
  115. Remove power from the Amiga.  Remove the screws securing the cover and remove
  116. the cover from the Amiga.  Remove the keyboard.  On some A500s  the  keyboard
  117. connector  is  not  polarized,  so  note it's orientation.  You don't have to
  118. remove the disk drive, but it will help if you unplug it's  cables  from  the
  119. motherboard and fold them out of the way.  Toward the back of the motherboard
  120. are the two CIAs.  Gently pry CIA B out of its socket (that's the one closest
  121. to  the  disk  drive),  and  install it on the I/O Expansion Board at U1.  Be
  122. careful to orient it correctly.  After installing the I/O Expansion Board and
  123. Serial  Interface   Board(s)  (see  "Mechanical  Installation"),  remove  the
  124. conductive material from the board and carefully insert the 40 pin DIP jumper
  125. on  the  end  of cable, CA1, into the CIA B socket, ensuring that all 40 pins
  126. line up correctly.  Then connect the 20x2 socket on  the  other  end  of  the
  127. cable  onto  the header at P1 on the I/O Expansion Board.  As long as you are
  128. careful and don't use excessive force, you should have no problems with  this
  129. part of the installation.
  130.  
  131. Now we're going to connect the two wires we attached to  J3  earlier.   These
  132. wires  bring  A14  and  A15  into the address decoder.  These signals are not
  133. available from the CIA socket, so we must look elsewhere.  A  good  place  to
  134. pick  up these signals is from the ROM.  Unfortunately, there are a number of
  135. different motherboards made for the A500.  The best way  to  determine  where
  136. A14  and  A15 are located on the ROM is to take an ohmeter and find out which
  137. ROM pins are connected to pin 42 (A14) and pin 43  (A15)  on  the  CPU.   The
  138. corresponding pins on the ROM should be somewhere around pin 36.  Some of the
  139. A500 schematics are incorrect as to the location of these signals on the ROM,
  140. so  it's best to check!  Solder the wire from the pad marked "A15" on the I/O
  141. Expansion Board to A15 on the ROM, and solder the wire from  the  pad  marked
  142. "A14"  on  the  I/O  Board  to A14 on the ROM.  This just about completes the
  143. electronic installation.  (Skip to "Mechanical Installation".)
  144.  
  145.  
  146. A1000 Installation
  147. ==================
  148. Remove power from the Amiga.  Remove the plastic cover from  the  Amiga  base
  149. unit.   Admire all the names.  Remove the RF shield and set aside.  You don't
  150. have to remove the disk drive, but it will help if you unplug it's cable from
  151. the motherboard and fold it out of the way.  Just in  back  of  the  internal
  152. drive  are  the two CIAs.  Gently pry CIA B out of its socket (that's the one
  153. closest to the daughterboard), and install it on the I/O Expansion  Board  at
  154. U1.   Be careful to orient it correctly.  Remove the conductive material from
  155. the board and place it on the left side of the Amiga, near and to the rear of
  156. the three custom chips.  Carefully insert the 40 pin DIP jumper on the end of
  157. cable, CA1, into the CIA  B  socket,  ensuring  that  all  40  pins  line  up
  158. correctly.   Then  connect the 20x2 socket on the other end of the cable onto
  159. the header at P1 on the I/O Expansion Board.  As long as you are careful  and
  160. don't  use excessive force, you should have no problems with this part of the
  161. installation.
  162.  
  163. Now we're going to connect the two wires we attached to  J3  earlier.   These
  164. wires  bring  A14  and  A15  into the address decoder.  These signals are not
  165. available from the CIA socket, so we must look elsewhere.  A  good  place  to
  166. pick up these signals is from the back of the daughter board.  A15 is located
  167. at  U2L,  pin  10,  and  A14  is  located  at   U2K,   pin   13   (see   file
  168. "IO_Exp_Scheme.iff").  Solder the wire from  the  pad  marked  "A15"  on  the
  169. I/O Expansion Board to U2L, pin 10, and solder the wire from the  pad  marked
  170. "A14"  on  the  I/O  Board  to  U2K,  pin  13.  This just about completes the
  171. electronic installation.  (Skip to "Mechanical Installation".)
  172.  
  173.  
  174. A2000 Installation
  175. ==================
  176. Note: The following installation was done on a Rev  4.2  motherboard.   Other
  177. motherboards may be somewhat different.
  178.  
  179. Remove power from the Amiga.  Five screws hold the case together,  4  on  the
  180. sides  and  1  at  the  back.  Unscrew them and slide off the top part of the
  181. case.  Make a sketch indicating the orientation of all cables connecting  the
  182. drive  bay  and  the  motherboard  and/or  other  cards  (such  as hard drive
  183. controller cards), then unplug them.  Remove the power  supply/drive  bay  by
  184. unscrewing  2  screws  in  front  and  4  in  the  back.   At  this point the
  185. motherboard should be completely exposed.
  186.  
  187. Underneath where the power supply was, before you removed  it,  are  the  two
  188. CIAs.   Gently  pry CIA B (labeled U301) out of its socket, and install it on
  189. the I/O Expansion Board at U1.  Be careful to orient it correctly.
  190.  
  191. One of the most difficult decisions you will have is where to mount  the  I/O
  192. Board.  The location you choose will be affected by how crowded your 2000 is,
  193. whether  you have a board in the CPU slot, etc., so it's not possible to give
  194. definite instructions.  Note that this decision will affect how  you'll  want
  195. to assemble the 40-pin DIP jumper, so hold off the construction of this cable
  196. until  you  have resolved the board's final location.  One idea is especially
  197. attractive:  Mount the I/O Board on a bare Zorro card, or maybe even  a  real
  198. Zorro  card (a HD controller with unused space reserved for a hard disk would
  199. be ideal).  This will give it sufficient mechanical sturdiness, and  make  it
  200. extremely  easy  to obtain A14 and A15 as well as additional power and ground
  201. lines.
  202.  
  203. After you have determined where the I/O Board is to be installed, remove  the
  204. conductive  material  from the board and install it.  Assemble the 40 pin DIP
  205. jumper cable, CA1, and carefully insert the DIP plug into the CIA  B  socket,
  206. ensuring that all 40 pins line up correctly.  Then connect the 20x2 socket on
  207. the  other end of the cable onto the header at P1 on the I/O Expansion Board.
  208. As long as you are careful and don't use excessive force, you should have  no
  209. problems with this part of the installation.
  210.  
  211. Now we're going to connect the two wires we attached to  J3  earlier.   These
  212. wires  bring  A14  and  A15  into the address decoder.  These signals are not
  213. available from the CIA socket, so we must look elsewhere.  There are  only  a
  214. few sources of A14 and A15 in the 2000.  The unbuffered signals are available
  215. at  the  68000/68010,  the ROM, and Agnus.  The use of the unbuffered address
  216. lines is not recommended.  Instead, grab A14 and A15 from U601  (an  74LS245)
  217. or one of the 100-pin "Zorro II" slots, as follows:
  218.  
  219.      U601
  220.      ----
  221.      A14 - pin 12
  222.      A15 - pin 11
  223.  
  224.      "Zorro II" slot
  225.      ---------------
  226.      A14 - pin 41
  227.      A15 - pin 43
  228.  
  229. This just about completes the electronic installation.
  230.  
  231.  
  232. Mechanical Installation
  233. =======================
  234. Note: As the following section was written primarily for an A1000, only  some
  235. portions  will  be applicable to other Amigas.  We encourage you to read this
  236. section even if you own an A2000.
  237.  
  238. Most  of  the remainder of the work is of a mechanical nature.  At this point
  239. you must make some decisions.  First of all, decide exactly where and how you
  240. want to secure the I/O Expansion Board in place.  In my own A1000, I set  one
  241. end  of  the  board  on top of the power harness, and supported the other end
  242. with plastic standoffs.
  243.  
  244. Where do you want to mount the connectors for the  serial  ports?   You  will
  245. find  that  the  four  D-subminiature  connectors  will  fit handily over the
  246. existing  row   of   connectors   on   the   Amiga's  rear  apron  (see  file
  247. "Installation.iff").   Each  serial  interface  board  connects  to  the  I/O
  248. Expansion Board with a 20 pin ribbon cable and header sockets.  The first two
  249. ports, Port 1 and Port 2, are connected to P4 on  the  I/O  Expansion  Board,
  250. while Port 3 and Port 4 are connected to P5.
  251.  
  252. What kind of connectors do you want to use for the parallel ports?  You could
  253. use D-subminiature connectors for the parallel ports if you can find a way to
  254. tell them apart  from  the  serial  ports.   Centronics-type  connectors  are
  255. another  option  for  the  parallel  ports.   After  deciding  what  type  of
  256. connectors  to  use,  either  solder  or  crimp  ribbon  cable  to  them,  as
  257. appropriate,  and  install  them temporarily.  Experiment with different wire
  258. routings until you are satisfied with the arrangement.  Now attach the  other
  259. end  of  the  ribbon cable to the I/O Board connectors, making sure to attach
  260. grounds to the two ground pads provided near pin 1 of P2 and P3.
  261.  
  262. Whatever connectors you do end up using will have to be installed  somewhere.
  263. You  will need to make cutouts for the connectors, and also cutouts in the RF
  264. shield.  One option may be  to  just  leave  the  shield  off  entirely,  but
  265. remember  that  you  are  responsible  for  any  RFI  that  results from your
  266. modifications.  This completes the installation.
  267.  
  268.  
  269. Debugging
  270. =========
  271. Note:  The following section was written primarily for an  A1000.   With  the
  272. exception  of  references  to  Kickstart,  most  of  the  remainder  will  be
  273. applicable to other Amigas.
  274.  
  275. Before you start permanently attaching things to your Amiga, you will want to
  276. try things out.  For simplicity, you may apply power  to  the  I/O  Expansion
  277. Board  without having the Interface Board(s) connected.  If you power up, and
  278. nothing at all happens, i.e. the screen doesn't change color - the power  LED
  279. may not come on, etc., turn the power off immediately, as you probably have a
  280. short  circuit.   Visually  inspect the board, and if you find nothing wrong,
  281. remove all the chips, except for the CIA at  U1,  and  temporarily  insert  a
  282. jumper  from U6, pin 1 to U6, pin 7.  This will have the effect of making the
  283. CIA look electrically to the Amiga as if the I/O Board wasn't there  at  all.
  284. Try powering up again.  If you get the Kickstart disk icon this time, you can
  285. pretty  well  suspect  a  bad IC, or a missing signal (or ground).  One other
  286. thing you may try at this time is to solder a 10K resistor between the  reset
  287. pin  of  any of the chips U2-U5 and +5V.  On some Amigas the built-in pull-up
  288. resistor may be insufficient.  If none of these  remedies  get  you  running,
  289. it's hardware debugging time, and I wish you luck.
  290.  
  291. If the Amiga does all or any of the following:
  292.  
  293.   1. Refuses to accept the Kickstart disk
  294.   2. The disk drive chatters and buzzes
  295.   3. Refuses to read the Workbench disk
  296.   4. Reads Workbench properly, but access light goes on and off,
  297.      drive double-steps, etc.
  298.  
  299. it is possible that you may be experiencing some noise problems, depending on
  300. when your Amiga was made.  The first thing to suspect in  this  case  is  the
  301. PAL's  on  the  daughterboard.  Run additional ground and +5V busses to all 4
  302. PAL's and both tower sockets.  If this doesn't do the  trick,  run  an  extra
  303. ground  lead  directly  to  the  I/O  Expansion  Board  at the pad marked "-"
  304. adjacent to P1, pin 1.  A +5 power lead may also  be  connected  to  the  pad
  305. marked  "+"  adjacent  to  P1,  pin 39, but should not normally be necessary.
  306. This should solve the problem.  The only other possibility is to  try  a  new
  307. 8520 (or 6526, which is considerably cheaper).  A bad CIA is possible in this
  308. case,  because  the  signals may be too weak to overcome the extra capacitive
  309. loading of the cable.  If the CIA worked fine before installing it in the I/O
  310. Board, but will not work correctly in the board, try  swapping  it  with  the
  311. other CIA before buying a new one.  
  312.  
  313.  
  314. Software
  315. ========
  316. Of course, hardware is next to useless without software to  drive  it.   This
  317. section describes the software available for the I/O Expansion Board.  Please
  318. note well that although every effort has been made to ensure completeness and
  319. compatibility,  this  is a Public Domain project.  All of the people who have
  320. created hardware or software for this project have done  so  in  their  spare
  321. time  without remuneration other than glory.  If you experience problems with
  322. the software, try to smile a lot and consider helping  to  write  an  updated
  323. version.   In  any  case,  please  contact  us  if   you   find   any   major
  324. incompatibilities or bugs.
  325.  
  326.  
  327. The Serial Driver
  328. -----------------
  329. Almost all programs written for the Amiga that use the serial port (with  the
  330. notable  exception of some MIDI software) access it indirectly via a standard
  331. software module called "serial.device".  As a result, most existing  software
  332. will work fine with the I/O Board given a suitable driver, and we supply one,
  333. named  "newser.device".   Simply copy it to your "DEVS:" directory and you're
  334. in business.  Most programs will permit you to change the device  name  (from
  335. serial.device  to newser.device) as well as the unit number (indicating which
  336. port is to be used), or you may use the supplied IOpatch  utility,  described
  337. below (see "Support Programs").
  338.  
  339. The newser.device supports 15 standard baud rates, from 50  to  38,400  baud,
  340. plus  MIDI (31,250 baud).  It also supports full hardware handshaking.  Up to
  341. four units may be open at one time, although the cpu may not be able to  keep
  342. up with all four units running above 2400 baud.
  343.  
  344. A more technical discussion of the serial driver is beyond the scope of  this
  345. article.   However,  it  is  worth  noting  that,  as with all other programs
  346. relating to the I/O Board, we supply complete assembly language  source  code
  347. of  the  driver.   If  you  encounter  a  problem - and all else fails - it's
  348. possible to fix it yourself.  (Please be sure to send Dan a copy of the fixed
  349. version!)  Technical questions, comments, praise, and criticism regarding the
  350. serial driver should be directed to the author:
  351.  
  352.        Dan Babcock
  353.        P.O. Box 1532
  354.        Southgate, MI  48195
  355.        U.S.A.
  356.  
  357.        People/Link: DANBABCOCK
  358.        Internet: dxb132@psuvm.psu.edu
  359.  
  360.  
  361. The Parallel Driver
  362. -------------------
  363. The four parallel ports on the I/O Expansion  Board  are  controlled  by  the
  364. eightbit.device.   There are no known differences between this device and the
  365. V1.3  parallel.device.   Applications  should  not  experience  any  problems
  366. communicating with the eightbit.device on the device level.
  367.  
  368. Full assembly language source code of the driver is  supplied  with  the  I/O
  369. Expansion  board.  (If you find and fix any bugs, please be sure to send Paul
  370. a copy  of  the  fixed  version!)   Any  questions,  comments,  praise,  etc.
  371. pertaining to the parallel driver should be directed to the author:
  372.  
  373.        Paul Coward
  374.        12 Dinmore St., Moorooka
  375.        Brisbane, Queensland 4105
  376.        AUSTRALIA
  377.  
  378.        (Mail to Paul may also be forwarded through The Puzzle Factory.)
  379.  
  380.  
  381. DOS-Level Support
  382. -----------------
  383. "DOS-level support" refers to the ability to get and send data via the serial
  384. and parallel ports with standard AmigaDOS commands, such as TYPE or LIST,  or
  385. with  any  program that does serial or parallel I/O via AmigaDOS, rather than
  386. directly via the Exec-level "newser.device"  or  "eightbit.device".  Although
  387. this  sort  of  capability  is not frequently used, it is useful from time to
  388. time.
  389.  
  390. In a perfect world,  DOS-level  support  would  mean  nothing  more  than  an
  391. appropriate  MountList  entry, specifying a driver name of "newser.device" or
  392. "eightbit.device", and some unit number of your choosing, corresponding to  a
  393. DOS  name  such  as  "SER1:" or "PAR2:".  Unfortunately, Commodore supplied a
  394. version of the Port-Handler and Aux-Handler with Workbench V1.3 that  doesn't
  395. permit  this;  rather,  they're  hard-coded  to use either "serial.device" or
  396. "parallel.device".  The printer.device suffers from a similar limitation.  At
  397. the time of this writing, we don't have a solution to the  problem  with  the
  398. printer  driver,  other  than  using  IOpatch.   We  do  have a port handler,
  399. however.  It's named "ioexp-handler".  Put this in your "L:"  directory,  and
  400. copy the supplied mountlist to "DEVS:", and you're in business.  In addition,
  401. the handlers in Workbench V2.0 have the capability  to  use  any  device  and
  402. unit, so this whole problem is non-existent if you have V2.0. (Well,
  403. that's what Andy Finkel told me some months ago. As of 37.59 it hasn't
  404. happened!)
  405.  
  406.  
  407. Support Programs
  408. ----------------
  409. Several programs  are  available  for  use  with  the  I/O  Expansion  Board.
  410.  
  411. SERprefs  functions  much  the same as the serial section of Preferences, but
  412. allows  you   to   set  and  save  parameters  for  all  four  units  of  the
  413. newser.device.   These  are  saved in "S:Serial-Preferences".
  414.  
  415. Many programs allow you to specify the device name and unit number,  so  that
  416. using  an alternate device driver is no problem.  For those applications that
  417. insist on using a particular device, we  have  written  a  nice  little  hack
  418. called  IOpatch.   This program SetFunction()s the exec OpenDevice call.  The
  419. user puts this program in his  startup-sequence,  or  otherwise  invokes  it,
  420. before  he runs his application program.  This patch will make a small window
  421. appear, whenever OpenDevice() is called, with a choice of units; 0-4.  Unit 0
  422. will select the internal serial or parallel port, and units 1-4  will  select
  423. one  of  the  newser.device  or  eightbit.device units.  Please note that the
  424. names of both drivers have been selected to be the same length as  the  names
  425. of  the original devices.  This has been done to facilitate file-zapping as a
  426. last resort.  Of course, software may be written that names the newser.device
  427. or eightbit.device specifically.
  428.  
  429. A suite of simple test programs to check the I/O Expansion Board Hardware can
  430. save you hours of hardware debugging time.  Chip selects, as well as read and
  431. write signals, are generated for all chips.   One program  simulates  a  very
  432. simple  character-oriented terminal program for checking an ACIA.  Please see
  433. Appendix D for information on other software.
  434.  
  435. A nice little program to drive a real-time clock-calendar is also  available.
  436. The  clock  hardware,  based  on  the  OKI  MSM5832, is capable of generating
  437. interrupts at 1024 hz, once per second, once per minute, or hourly.  Software
  438. to take advantage of this feature is left as an  exercize  for  the  student.
  439. See the SOURCES section for availability of a bare board for this clock.
  440.  
  441.  
  442. Credits
  443. =======
  444. I would like to thank Dan Babcock for the many hours he put  in  writing  and
  445. debugging  the  serial  device  driver.   This  was  surely  one  of the most
  446. difficult parts of this project.  Paul Coward, of DigiSoft, provided us  with
  447. the  parallel device driver, no small achievement either.  Jim Cooper, of The
  448. Software  Distillery,  made  many  helpful  suggestions  concerning  software
  449. issues,  especially in the area of DOS compatibility, and helped us get up to
  450. speed.  Bill Seymour provided invaluable help in layout and pre-production of
  451. the PCBs, and also provided design help.  Finally, this task was made  easier
  452. by the help and encouragment of Doug Sears and Grace Lavin.
  453.  
  454.  
  455. Conclusion
  456. ==========
  457. I think this is a pretty neat little hack.  I also feel  that  it  is  simple
  458. enough  that  if  I  hadn't  come  up  with  it, someone else would have.  It
  459. provides some much-needed additional I/O for the Amiga 500, 1000 or 2000 at a
  460. rock-bottom price.  If enough software becomes available  to  warrant  it,  I
  461. will  try  to  set  up some sort of software clearing house for use with this
  462. board.  Keep an  eye  on  BIX  or  my  BBS,  The  Symposium,  for  any  news.
  463. Meanwhile,  I  hope you enjoy using this board.  And don't let the blue smoke
  464. out!
  465.  
  466.  
  467. Amiga, Kickstart & Workbench are trademarks of Commodore-Amiga, Inc.
  468.  
  469.  
  470. *****************************************************************************
  471. *                                                                           *
  472. *                           APPENDIX A  -  SOURCES                          *
  473. *                                                                           *
  474. *****************************************************************************
  475.  
  476. Bare boards and other hard-to-find parts may  be  obtained  from  The  Puzzle
  477. Factory.  Detailed assembly instructions will be supplied, on disk, with kits
  478. 1,  1A,  2,  2A and 3.  In particular, the CMOS serial and parallel chips, as
  479. well as the Maxim chips may be difficult to find in single quantities.  Other
  480. parts may be found at the mail order electronic supply firms listed below, or
  481. any good parts house.
  482.  
  483. The Puzzle Factory will make  only  the  following  items  available  for  an
  484. indefinite period of time.  Please do not request custom kits:
  485.  
  486. 1.  BAREBOARDS   1 PCB1 I/O Expansion Board
  487.                  1 PCB2 Serial Interface Board                        $20.00
  488. 1A. BAREBOARDS2  1 PCB1 I/O Expansion Board
  489.                  2 PCB2 Serial Interface Board                        $25.00
  490. 2.  ALMOSTBARE   Everything in BAREBOARDS, and the following ICs:
  491.                  1 each: R65C22P1, R65C52P1, MAX238CNG                $45.00
  492. 2A. ALMOSTBARE2  Everything in BAREBOARDS2, and the following ICs:
  493.                  2 each: R65C22P1, R65C52P1
  494.                  4 each: MAX238CNG                                    $70.00
  495. 3.  FOUR_PORTS   Everything in ALMOSTBARE, and enough parts to
  496.                  build a complete I/O System with 2 serial and
  497.                  2 parallel ports.  (U7, OSC1, SO7 not included.)     $70.00
  498. 4.  FOUR_MORE    All parts necessary to add 2 serial and 2 parallel
  499.                  ports to FOUR_PORTS.  (U7, OSC1, SO7 not included.)  $40.00
  500. 5.  MIDI_UP      1 each: U7, OSC1, SO7                                $ 6.00
  501. 6.  CLOCKBOARD   1 PCB3 Clock/Calendar Board suitable for building a
  502.                  real-time clock/calendar based on the OKI MSM5832.
  503.                  Instructions for assembling the clock are included
  504.                  on disk with kits 1, 1A, 2, 2A and 3.  (Parts are
  505.                  readily available, but not from us.)                 $ 6.50
  506.  
  507. Shipping:        Prices for up to 1 lb.  If shipping several kits     $CALL
  508. --------
  509. North America:   UPS Ground                                           $ 3.00
  510.                  UPS Blue Label, or Small Packet Air                  $ 5.00
  511.                  Federal Express Overnite                             $CALL
  512. Overseas:        Small Packet Air only                                $ 8.00
  513.                  Federal Express Overnite                             $CALL
  514.  
  515. Prices are subject to change without notice.   Please  call  for  prices  and
  516. availability  before  ordering.   All  prices  are  in  U.S.  dollars.  Visa,
  517. MasterCard and Money Orders are preferred.  No CODs will be accepted.
  518.  
  519.  
  520.  
  521. The Puzzle Factory, Inc.     Digi-Key, Corporation
  522. P.O. Box 986                 701 Brooks Ave. South
  523. Veneta, OR 97486             P.O. Box 677
  524. (503) 935-3709               Thief River Falls, NM 56701-0677
  525.                              (800) 344-4539
  526.  
  527. Mouser Electronics           Mouser Electronics          Mouser Electronics
  528. 11433 Woodside Ave.          2401 Hwy 287 North          12 Emory Ave.
  529. Santee, CA 92071             Mansfield,TX 76063          Randolph, NJ 07869
  530. (800) 346-6873               (800) 346-6873              (800) 346-6873
  531.  
  532. JDR Microdevices             Jameco Electronics
  533. 2233 Branham Lane            1355 Shoreway Road
  534. San Jose, CA 95124           Belmont, CA 94002
  535. (800) 538-5000               (415) 592-8097
  536.  
  537.  
  538.  
  539. *****************************************************************************
  540. *                                                                           *
  541. *                         APPENDIX B  -  PARTS LIST                         *
  542. *                                                                           *
  543. *****************************************************************************
  544.  
  545. *** MAIN BOARD PARTS LIST ***
  546.  
  547. PCB1    = I/O Expansion Board circuit board
  548. U1      = 8520 integrated circuit (CIA B from Amiga)
  549. U2, U3  = R65C22P1 VIA integrated circuit
  550. U4, U5  = R65C52P1 DACIA integrated circuit
  551. U6      = 74F139 integrated circuit
  552. U7      = 74LS90 integrated circuit (optional for MIDI)
  553.  
  554. X1      = 3.6864 Mhz crystal
  555. OSC1    = 5.0 Mhz TTL clock oscillator (optional for MIDI)
  556.  
  557. R1, R2  = 1K 1/4W 5% resistor
  558. C1, C2  = 18 pf capacitor
  559. C3      = 22 uf 6.3V decoupling capacitor
  560. C4-C10  = .01 uf decoupling capacitor
  561.  
  562. P1      = 20x2 pin dual-row header
  563. P2, P3  = 20x1 pin single-row male header
  564. P4, P5  = 10x2 pin dual-row header
  565.  
  566. J1, J2  = 3x1 pin single-row header
  567. J3      = 2x1 pin single-row header
  568.  
  569. S1, S2  = Shorting jumpers, gold inlay
  570.  
  571. SO1-SO5 = 40 pin DIP socket
  572. SO6     = 16 pin DIP socket
  573. SO7     = 14 pin DIP socket (Optional for MIDI)
  574.  
  575. This parts list is for building a 4/4 port board.  Depending on which set  of
  576. parts  you  order, and whether you are building 2 or 4 ports, you may receive
  577. fewer parts than this.
  578.  
  579.  
  580. *** INTERFACE BOARD PARTS LIST ***
  581.  
  582. PCB2    = Serial Interface Board
  583. U1, U2  = MAX238CNG
  584.  
  585. R1, R2  = 1K 1/4W 5% resistor (Optional)
  586. C1, C5  = 4.7 uf 25V Capacitor, charge pump
  587. C2, C6  = 4.7 uf 25V Capacitor, charge pump
  588. C3, C7  = 10 uf 25V Capacitor, charge pump
  589. C4, C8  = 10 uf 25V Capacitor, charge pump
  590.  
  591. P1      = 10x2 pin dual-row header
  592. P2, P3  = 25 pin right-angle pcb male D-sub connector
  593.  
  594. SO1,SO2 = 24 pin DIP socket on .300" centers
  595.  
  596. Please  note  that  this  parts list will build 1 Interface Board, which will
  597. provide 2 ports.  For 4 serial ports, 2 Interface Boards are required.
  598.  
  599.  
  600. *** CABLE PARTS LIST ***
  601.  
  602. N1      = 20x2 pin dual-row socket connector
  603. N2, N3  = 10x2 pin dual-row socket connector
  604. CA1     = 40 pin DIP plug with 9" 28 ga. ribbon cable, rainbow
  605. CA2     = 20 conductor, 28 ga. ribbon cable, rainbow
  606.  
  607. Please note that this parts list will connect the I/O Expansion Board to  the
  608. Amiga  and  to  1  Interface Board, which will provide 2 ports.  For 4 serial
  609. ports, more parts are required.
  610.  
  611.  
  612. *** CLOCK PARTS LIST ***
  613.  
  614. PCB3    = Clock/Calendar Board
  615. U1      = OKI MSM5832 Real-time Clock/calendar integrated circuit
  616. X1      = 32.768 Khz clock crystal
  617. C1      = 4.7 uf 6.3V decoupling capacitor
  618. C2      = 20 pf disc capacitor
  619. C3      = 5-35 pf variable capacitor
  620. R1      = 2.7K 1/4W 5% resistor
  621. R2      = 100 ohm 1/4W 5% resistor (Not required with lithium battery)
  622. D1      = 1N4000 diode (Not required with lithium battery)
  623. SO1     = 18 pin DIP socket
  624. P1      = 20x1 pin single-row right-angle socket connector
  625. B1      = NiCad or Lithium battery
  626.  
  627. Please note that the above clock parts are readily available,  but  not  from
  628. us, except for the printed circuit board, PCB3.
  629.  
  630.  
  631. *****************************************************************************
  632. *                                                                           *
  633. *                      APPENDIX C  -  PORT ASSIGNMENTS                      *
  634. *                                                                           *
  635. *****************************************************************************
  636.  
  637. There are four possible units associated with the newser.device, as follows:
  638.  
  639.      Unit 1: U4, ACIA2 -> P4, pins  1-10
  640.      Unit 2: U4, ACIA1 -> P4, pins 11-20
  641.      Unit 3: U5, ACIA2 -> P5, pins  1-10
  642.      Unit 4: U5, ACIA1 -> P5, pins 11-20
  643.  
  644. The serial interface connector pinouts are arranged as  follows.   Note  that
  645. these connectors are symmetrical:
  646.  
  647.      GND   ( 1)  ( 2)   GND
  648.      TxD01 ( 3)  ( 4) RxD01
  649.      RTS01 ( 5)  ( 6) CTS01
  650.      DTR01 ( 7)  ( 8) DSR01
  651.      +5    ( 9)  (10) DCD01
  652.      DCD00 (11)  (12)    +5
  653.      DSR00 (13)  (14) DTR00
  654.      CTS00 (15)  (16) RTS00
  655.      RxD00 (17)  (18) TxD00
  656.      GND   (19)  (20)   GND
  657.  
  658. There are four possible units associated with the eightbit.device, as follows:
  659.  
  660.      Unit 1: U2, Port A -> P2, pins  1-10 + ground
  661.      Unit 2: U2, Port B -> P2, pins 11-20 + ground
  662.      Unit 3: U3, Port A -> P3, pins  1-10 + ground
  663.      Unit 4: U3, Port B -> P3, pins 11-20 + ground
  664.  
  665. The parallel interface connector pinouts are arranged as follows:
  666.  
  667.      Name    P2       Name    P3     Comments
  668.      ====    ==       ====    ==     ========
  669.      CA1.2    1       CA1.3    1     Control line 1, Port A
  670.      CA2.2    2       CA2.3    2     Control line 2, Port A
  671.      PA0.2    3       PA0.3    3     Data line 0, Port A
  672.      PA1.2    4       PA1.3    4     Data line 1, Port A
  673.      PA2.2    5       PA2.3    5     Data line 2, Port A
  674.      PA3.2    6       PA3.3    6     Data line 3, Port A
  675.      PA4.2    7       PA4.3    7     Data line 4, Port A
  676.      PA5.2    8       PA5.3    8     Data line 5, Port A
  677.      PA6.2    9       PA6.3    9     Data line 6, Port A
  678.      PA7.2   10       PA7.3   10     Data line 7, Port A
  679.      PB0.2   11       PB0.3   11     Data line 0, Port B
  680.      PB1.2   12       PB1.3   12     Data line 1, Port B
  681.      PB2.2   13       PB2.3   13     Data line 2, Port B
  682.      PB3.2   14       PB3.3   14     Data line 3, Port B
  683.      PB4.2   15       PB4.3   15     Data line 4, Port B
  684.      PB5.2   16       PB5.3   16     Data line 5, Port B
  685.      PB6.2   17       PB6.3   17     Data line 6, Port B
  686.      PB7.2   18       PB7.3   18     Data line 7, Port B
  687.      CB1.2   19       CB1.3   19     Control line 1, Port B
  688.      CB2.2   20       CB2.3   20     Control line 2, Port B
  689.      GND.2  PAD       GND.3   PAD
  690.  
  691.  
  692. *****************************************************************************
  693. *                                                                           *
  694. *                          APPENDIX D  -  SOFTWARE                          *
  695. *                                                                           *
  696. *****************************************************************************
  697.  
  698. NewSER/newser.device
  699. ====================
  700. A serial device driver which supports 15 standard  baud  rates,  from  50  to
  701. 38,400  baud,  plus  MIDI  (31,250  baud).   It  also  supports full hardware
  702. handshaking.  Up to four units may be open at one time, although the cpu  may
  703. not be able to keep up with all four units running above 2400 baud.
  704.  
  705. NewPAR/eightbit.device
  706. ======================
  707. A parallel device driver similar in operation  to  the  standard  Amiga  V1.3
  708. parallel.device.
  709.  
  710. Handler/ioexp-handler
  711. =====================
  712. A small handler that supports AmigaDOS operations for the  newser.device  and
  713. eightbit.device.
  714.  
  715. SERprefs/SERprefs
  716. =================
  717. This program functions much the same as the serial  section  of  Preferences,
  718. but  allows  you  to  set  and  save  parameters  for  all  four units of the
  719. newser.device.
  720.  
  721. IOpatch/IOpatch
  722. ===============
  723. A nice little hack to allow use of the newser.device or eightbit.device  with
  724. applications  that  insist  on  using  a  particular  device.   This  program
  725. SetFunction()s the exec OpenDevice() call.
  726.  
  727. Test/IOSetup
  728. ============
  729. Places known values in certain registers on the I/O Expansion Board  so  that
  730. they may be verified with the IOPrint program.
  731.  
  732. Test/IOPrint
  733. ============
  734. Prints (to stdout) all the registers on the I/O Expansion Board.
  735.  
  736. Test/IOTest
  737. ===========
  738. A suite of 9 simple test programs to check the I/O Expansion Board  Hardware.
  739. Generates  chip  selects,  as  well as read and write signals, for all chips.
  740. One program simulates a very simple character-oriented terminal  program  for
  741. checking an ACIA.
  742.  
  743. Test/PARtest
  744. ============
  745. A test program for the Rockwell 65C22.  This program takes a filespec as  its
  746. only  argument, and stuffs the file out parallel Port 2 (VIA #1, Port A) to a
  747. printer.  No devices are involved; we go right  to  the  hardware.   In  this
  748. version, interrupts are not used, and handshaking is accomplished by hardware
  749. polling.
  750.  
  751. Time/Time
  752. =========
  753. A small program to drive an OKI MSM5832 real-time  clock-calendar.   Provides
  754. system  interface  functions  to  allow  setting  the clock from sysTime, and
  755. setting sysTime from the clock.
  756.  
  757.  
  758. =eof=
  759.